package com.hushow.plugin.brick.controller;

import com.hushow.plugin.brick.service.impl.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/plugin")
@Slf4j
public class PaymentController {

    @Resource
    private PaymentService paymentService;


    @GetMapping("/pay")
    public String pay(Map<String, Object> orderInfo, String paymentMethod) {
        return paymentService.makePayment(orderInfo, paymentMethod);
    }
}
